#ifndef H_UTILITIES
#define H_UTILITIES

#ifdef __cplusplus
extern "C" {
#endif

#include<stdint.h>

void read_control(float *x, float *y, float *sx, float *sy, float *px, float *py);

void get_time(int *yr, int *mo, int*dy, int *hr);

void adjust_time(int period, int *yr, int *mn, int *dy, int *hr);

void write_parinit(int num_ensemble, int numpar, double *px_bar, float *px_tlat, float *px_tlon, float *px_zlvl, float *px_sigh, float *px_sigw, float *px_sigv, int16_t *px_page, int16_t *px_hdwp, int16_t *px_ptyp, int16_t *px_pgrd, double **pxen_mass, float **pxen_tlat, float **pxen_tlon, float **pxen_zlvl, float **pxen_sigh, float **pxen_sigw, float **pxen_sigv, int16_t **pxen_page, int16_t **pxen_hdwp, int16_t **pxen_ptyp, int16_t **pxen_pgrd);

void modify_control();

void statmain(int totalstep, int totstep, int ostep);

#ifdef __cplusplus
}
#endif

#endif
